<?php if(!defined('SIDELOADED')) { echo 'Direct access is not allowed.'; }

/**
 * Create an anchor-tag.
 * @param string $link The link to which the anchor should point.
 * @param string $name The name of the anchor.
 * @return string The anchor.
 */
function anchor($link, $name = null) {
  
  if(isset($name)) {
    
    return '<a href="' . $link . '">' . $name . '</a>';
    
  } else {
    
    return '<a href="' . $link . '">' . $link . '</a>';
    
  }
  
}
